/**
 * Created by small on 2015/4/10.
 */
$(document).ready(function(){
    $(".circle").hover(function(){
        $(this).find("ul").css({"opacity":"1","transform":"translateX(50px)"});
        $(this).find("ul > li").eq(0).css({"transform":"translateX(50px) rotate(-20deg)","opacity":"1"});
        $(this).find("ul > li").eq(1).css({"transform":"translateX(54px) rotate(0deg)","opacity":"1"});
        $(this).find("ul > li:last-child").css({"transform":"translateX(50px) rotate(20deg)","opacity":"1"});
    },function(){
        var circle = $(this);
        $(this).find("ul > li").eq(0).css({"transform":"translateX(0px) rotate(0deg)","opacity":"0"});
        $(this).find("ul > li").eq(1).css({"transform":"translateX(0px) rotate(0deg)","opacity":"0"});
        $(this).find("ul > li:last-child").css({"transform":"translateX(0px) rotate(0deg)","opacity":"0"});
        $(this).find("ul").css({"opacity":"0","transform":"translateX(0px)"});
    });
    //显示当前时间
    function showTime(){
        var date = new Date();
        var year = date.getFullYear();
        var month = date.getMonth() + 1;
        var day = date.getDay();
        var hour = date.getHours();
        var min = date.getMinutes();
        var sec = date.getSeconds();
        if(parseInt(sec)<=9){
            sec='0' + sec;
        }
        document.getElementById("time").innerHTML = year +"-" + month +"-" + day +" " + hour  +":" + min +":" + sec;
    }
    showTime();
    setInterval(showTime,1000);

});